﻿@using Utry.Framework.Mvc
@model Utry.CI.Models.ReviewModel
@{
    ViewBag.Title = "需求列表";
}

<div style="margin-top:60px;">

@Html.JPartial("_Notifications")




<div class="row">
            <div class="col-md-12">
               <!-- BEGIN EXAMPLE TABLE PORTLET-->
   
                  
                  <div class="portlet-body">
                     <div class="table-toolbar">
                        <div class="btn-group">
                           <button id="sample_editable_1_new" class="btn btn-success">
                           新增 <i class="icon-plus"></i>
                           </button>
                        </div>
                        
                     </div>
                     <table class="table table-striped table-hover table-bordered" id="sample_editable_1">
                        <thead>
                           <tr>
                              <th style="display:none;">ID</th>
                              <th>需求编号</th>
                              <th>问题描述</th>
                              <th>提出人</th>
                              <th>截止时间</th>
                              <th>解决人</th>
                              <th>UTMP状态</th>
                              <th>评审状态</th>
                              <th>开发工时</th>
                              <th>设计工时</th>
                              <th>测试工时</th>
                              <th>编辑</th>
                              <th>删除</th>
                           </tr>
                        </thead>
                        <tbody id="ReviewList">
                            @foreach (var item in Model.ReviewProList)
                            {
                                <tr>
                                    <td style="display:none;">@item.ID</td>
                                    <td>@item.DemandCode</td>
                                    <td>@item.Description</td>
                                    <td>@item.Provider</td>
                                    <td>@item.Deadline.ToString()</td>
                                    <td>@item.Solver</td>
                                    <td>@item.demandstate</td>
                                    <td>@item.IfSolve</td>
                                    <td>@item.DevelopTime</td>
                                    <td>@item.DesignTime</td>
                                    <td>@item.TestTime</td>
                                    <td><a class="edit" href="javascript:;">编辑</a></td>
                                    <td><a class="delete" href="javascript:;">删除</a></td>
                                </tr>
                            }
                        </tbody>
                     </table>
                  </div>
               
               <!-- END EXAMPLE TABLE PORTLET-->
            </div>
         </div>
            
         <div id="Responsive" class="modal fade" tabindex="-1" aria-hidden="true">
              <div class="modal-dialog">
                 <div class="modal-content">
                    <div class="modal-header">
                       <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                       <h4 class="modal-title">选择人员</h4>
                    </div>
                    <div class="modal-body">
                         <p>
                             <select class="form-control select2_sample1" multiple id="Providerddl">
                             @foreach (var item in Model.UserList)
                             {
                                 <option value="@item.UserName">@item.FullName</option>
                             }
                             </select>
                         </p>
                    </div>
                    <div class="modal-footer">
                       <button type="button" data-dismiss="modal" class="btn btn-default">关闭</button>
                       <button type="button" class="btn btn-success" data-dismiss="modal" id="Providersbm">保存</button>
                    </div>
                 </div>
              </div>
          </div>          <div id="basic" class="modal fade" tabindex="-1" role="basic" aria-hidden="true">
              <div class="modal-dialog">
                 <div class="modal-content">
                    <div class="modal-header">
                       <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
                       <h4 class="modal-title">选择人员!</h4>
                    </div>
                    <div class="modal-body">
                         <p>
                             <select class="form-control select2_sample1" multiple id="Solverddl">
                             @foreach (var item in Model.UserList)
                             {
                                 <option value="@item.UserName">@item.FullName</option>
                             }
                             </select>
                         </p>
                    </div>
                    <div class="modal-footer">
                       <button type="button" data-dismiss="modal" class="btn btn-default">关闭</button>
                       <button type="button" class="btn btn-success" data-dismiss="modal" id="Solversbm">保存</button>
                    </div>
                 </div>
              </div>
          </div>

</div>

<script src="/Assets/scripts/app.js" type="text/javascript" charset="utf-8"></script>
<script src="/Assets/scripts/reviewlisttable-editable.js" type="text/javascript"></script>
<script src="../../Assets/scripts/form-samples.js" type="text/javascript"></script>
<script type="text/javascript">
    jQuery(document).ready(function () {
        $("#Providersbm").click(function () {                //保存问题提出人
            var fullname = $("#Providerddl").find("option:selected").text();
            var username = $("#Providerddl").val();
            $("#Provider").val(fullname);
            $("#hidProvider").val(username+",");
        });

        $("#Solversbm").click(function () {                //保存问题解决人
            var fullname = $("#Solverddl").find("option:selected").text();
            var username = $("#Solverddl").val();
            $("#Solver").val(fullname);
            $("#hidSolver").val(username+",");
        });
        App.init();
        TableEditable.init();
        FormSamples.init();


    });
     
</script>



